import { computed } from 'vue';
import { isSurveyComName } from '@/utils';
// 计算题目编号
export function useSurveyNo(coms) {
  return computed(() => {
    let questionNumber = 1;
    return coms.map((com) => {
      if (isSurveyComName(com.name)) {
        return questionNumber++;
      }
      return questionNumber;
    });
  });
}
